﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lexer.SyntaxTree
{
    abstract class SyntaxNode
    {
        private SyntaxNode nextNode;
        public virtual SyntaxNode NextNode
        {
            get { return this.nextNode; }
            set { this.nextNode = value; }
        }
        public void AddToEnd(SyntaxNode node)
        {
            if (this.nextNode == null)
                this.nextNode = node;
            else
                this.nextNode.AddToEnd(node);
        }
        public abstract override String ToString();
    }
}
